import { Pressable, Text, View } from "react-native";
import { Component } from "react";
import { RoleRep } from "../../../src/Account/Data/role_data.ts";
import { BOSS, WORKER } from "../../../src/store/reducers/UserRole.ts";

class Resume extends Component<any, any> {

  roleRep: RoleRep = new RoleRep();

  handleToBoss = () => {
    console.log("切换角色-老板");
    this.roleRep.selectRole(BOSS);
  };

  render() {
    return (
      <View>
        <Pressable onPress={this.handleToBoss}>
          <Text style={{ textAlign: "center", padding: 16, backgroundColor: "blue", color: "white" }}>
            切换到老板
          </Text>
        </Pressable>
        <Text>
          找工人
        </Text>
      </View>
    );
  }

  static title(): string {
    return "找工人";
  }
}

export default Resume;
